﻿//using System;
//using System.Linq;

//using ApplicationBoilerplate.DataProvider;

//using MongoDB.Bson;
//using MongoDB.Driver.Builders;

//namespace MVCBootstrap.MongoDB {

//    public static class IRepositoryExtensions {

//        public static void Delete<TEntity>(this IRepository<TEntity> repository, ObjectId id) where TEntity : class {
//            ((Repository<TEntity>)repository).Collection.Remove(Query.EQ("_id", id));
//        }

//        public static TEntity Read<TEntity>(this IRepository<TEntity> repository, ObjectId id) where TEntity : class {
//            return ((Repository<TEntity>)repository).Collection.FindOneByIdAs<TEntity>(id);
//        }
//    }
//}